package net.lahuobao.mall.entity.admin;

import net.lahuobao.export.datasoruce.annotation.ExportField;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.jeecgframework.web.system.pojo.base.TSBaseUser;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**   
 * @Title: Entity
 * @Description: E卡返点
 * @author zhangdaihao
 * @date 2016-12-27 17:34:53
 * @version V1.0   
 *
 */
@Entity
@Table(name = "mall_ecard_rebate", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
@SuppressWarnings("serial")
public class MallEcardRebateEntity implements java.io.Serializable {

	/**主键*/
	@ExportField(title="", isShow = 0, sort=10)
	private java.lang.Integer id;

	/**返回类型 0:点数,1:直返*/
	@ExportField(title="",isShow = 0, sort=20)
	private java.lang.Integer rebatetype;

	@ExportField(title="返点类型", sort=30)
	private java.lang.String rebatetypeName;

	/**返点点数*/
	@ExportField(title="返点点数", sort=40)
	private BigDecimal rebatenum;

	/**返点金额*/
	@ExportField(title="返点金额", sort=50)
	private BigDecimal rebatemoney;

	/**返点时间*/
	@ExportField(title="返点时间", sort=60, isTranf = 1, tranfType = 2)
	private java.util.Date rebatetime;

	@ExportField(title="返点操作人", sort=70)
	private String rebateUserName;

	/**退回金额*/
	@ExportField(title="退回金额", sort=80)
	private BigDecimal returnmoney;

	/**退回时间*/
	@ExportField(title="退回时间",sort=90)
	private java.util.Date returntime;

	/**退回原因*/
	@ExportField(title="退回原因", sort=91)
	private java.lang.String returnreason;

	@ExportField(title="退回操作人", sort=100)
	private String returnUserName;

	/**状态 0：返点 1：部分退回，2：全部退回*/
	@ExportField(title="",isShow = 0,sort=101)
	private java.lang.Integer state;

	@ExportField(title="状态", sort=110)
	private  String stateName;

	/**返点操作人*/
	@ExportField(title="", isShow = 0,sort=10)
	private java.lang.String rebateoperator;

	/**退回操作人*/
	@ExportField(title="", isShow = 0,sort=10)
	private java.lang.String returnoperator;

	@ExportField(title="", isShow = 0,sort=10)
	private TSBaseUser rebateUser;

	@ExportField(title="", isShow = 0,sort=10)
	private TSBaseUser returnUser;

    /**返点复核人*/
    @ExportField(title="", isShow = 0,sort=10)
    private java.lang.String rebateauditoperator;

    //返点复核人名字
    @ExportField(title="返点复核人", sort=120)
    private String rebateAuditUserName;

    /**返点复核状态:0未审核，1审核通过，2审核不通过*/
    @ExportField(title="",isShow = 0,sort=121)
    private java.lang.Integer rebateauditstate;

    @ExportField(title="返点复核状态", sort=130)
    private java.lang.String rebateauditstateName;

    /**返点复核时间*/
    @ExportField(title="返点复核时间", sort=140)
    private java.util.Date rebatereviewtime;

    /**返点未通过原因*/
    @ExportField(title="返点复核未通过原因", sort=150)
    private java.lang.String rebaterejectreason;

    /**退回复核人*/
    @ExportField(title="", isShow = 0, sort=10)
    private java.lang.String returnauditoperator;

    //退回复核人名字
    @ExportField(title="退回复核人", sort=160)
    private String returnAuditUserName;

    /**退回复核状态:0未审核，1审核通过，2审核不通过*/
    @ExportField(title="",isShow = 0,sort=161)
    private java.lang.Integer returnauditstate;

    @ExportField(title="退回复核状态", sort=170)
    private java.lang.String returnauditstateName;

    /**退回复核时间*/
    @ExportField(title="退回复核时间", sort=180)
    private java.util.Date returnreviewtime;

    /**退回未通过原因*/
    @ExportField(title="退回未通过原因", sort=190)
    private java.lang.String returnrejectreason;

    @ExportField(title="", isShow = 0,sort=10)
    private TSBaseUser rebateAuditUser;

    @ExportField(title="", isShow = 0,sort=10)
    private TSBaseUser returnAuditUser;


    /**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  主键
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name ="ID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getId(){
		return this.id;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  主键
	 */
	public void setId(java.lang.Integer id){
		this.id = id;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  返回类型 0:点数,1：直返
	 */
	@Column(name ="REBATETYPE",nullable=false,precision=10,scale=0)
	public java.lang.Integer getRebatetype(){
		return this.rebatetype;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  返回类型 0:点数,1：直返
	 */
	public void setRebatetype(java.lang.Integer rebatetype){
		this.rebatetype = rebatetype;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  返点金额
	 */
	@Column(name ="REBATEMONEY",nullable=false,precision=18,scale=2)
	public BigDecimal getRebatemoney(){
		return this.rebatemoney;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  返点金额
	 */
	public void setRebatemoney(BigDecimal rebatemoney){
		this.rebatemoney = rebatemoney;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  返点点数
	 */
	@Column(name ="REBATENUM",nullable=false,precision=18,scale=4)
	public BigDecimal getRebatenum(){
		return this.rebatenum;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  返点点数
	 */
	public void setRebatenum(BigDecimal rebatenum){
		this.rebatenum = rebatenum;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  退回金额
	 */
	@Column(name ="RETURNMONEY",nullable=true,precision=18,scale=0)
	public BigDecimal getReturnmoney(){
		return this.returnmoney;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  退回金额
	 */
	public void setReturnmoney(BigDecimal returnmoney){
		this.returnmoney = returnmoney;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  状态 0：返点 1：部分退回，2：全部退回
	 */
	@Column(name ="STATE",nullable=false,precision=10,scale=0)
	public java.lang.Integer getState(){
		return this.state;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  状态 0：返点 1：部分退回，2：全部退回
	 */
	public void setState(java.lang.Integer state){
		this.state = state;
	}
	/**
	 *方法: 取得java.util.Date
	 *@return: java.util.Date  返点时间
	 */
	@Column(name ="REBATETIME",nullable=false)
	public Date getRebatetime() {
		return rebatetime;
	}

	/**
	 *方法: 设置java.util.Date
	 *@param: java.util.Date  返点时间
	 */
	public void setRebatetime(Date rebatetime) {
		this.rebatetime = rebatetime;
	}

	/**
	 *方法: 取得java.util.Date
	 *@return: java.util.Date  退回时间
	 */
	@Column(name ="RETURNTIME",nullable=true)
	public java.util.Date getReturntime(){
		return this.returntime;
	}

	/**
	 *方法: 设置java.util.Date
	 *@param: java.util.Date  退回时间
	 */
	public void setReturntime(java.util.Date returntime){
		this.returntime = returntime;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  返点操作人
	 */
	@Column(name ="REBATEOPERATOR",nullable=false,length=32)
	public java.lang.String getRebateoperator(){
		return this.rebateoperator;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  返点操作人
	 */
	public void setRebateoperator(java.lang.String rebateoperator){
		this.rebateoperator = rebateoperator;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  返点操作人
	 */
	@Column(name ="RETURNOPERATOR",nullable=false,length=32)
	public java.lang.String getReturnoperator(){
		return this.returnoperator;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  返点操作人
	 */
	public void setReturnoperator(java.lang.String returnoperator){
		this.returnoperator = returnoperator;
	}

	@OneToOne
	@JoinColumn(name = "rebateoperator", insertable = false, updatable = false)
	public TSBaseUser getRebateUser() {
		return rebateUser;
	}

	public void setRebateUser(TSBaseUser rebateUser) {
		this.rebateUser = rebateUser;
	}

	@OneToOne
	@JoinColumn(name = "returnoperator", insertable = false, updatable = false)
	public TSBaseUser getReturnUser() {
		return returnUser;
	}

	public void setReturnUser(TSBaseUser returnUser) {
		this.returnUser = returnUser;
	}

	@Column(name ="returnreason",nullable=true,length=255)
	public String getReturnreason() {
		return returnreason;
	}

	public void setReturnreason(String returnreason) {
		this.returnreason = returnreason;
	}

	@Transient
	public String getRebatetypeName() {
		if(null == this.rebatetype){
			return "";
		}else {
			return this.rebatetype.intValue() == 0 ? "点数" : "直返";
		}
	}

	public void setRebatetypeName(String rebatetypeName) {
		this.rebatetypeName = rebatetypeName;
	}

	@Transient
	public String getRebateUserName() {
		return this.rebateUser == null ? "" : this.rebateUser.getUserName();
	}

	public void setRebateUserName(String rebateUserName) {
		this.rebateUserName = rebateUserName;
	}

	@Transient
	public String getReturnUserName() {
		return this.returnUser == null ? "" : this.returnUser.getUserName();
	}

	public void setReturnUserName(String returnUserName) {
		this.returnUserName = returnUserName;
	}

	@Transient
	public String getStateName() {
		if(null == this.state){
			return "";
		}
		switch (this.state){
			case 0:
				return "返点";
			case 1:
				return "部分退回";
			case 2:
				return "全部退回";
		}
		return stateName;
	}

    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  返点复核人
     */
    @Column(name ="REBATEAUDITOPERATOR",nullable=true,length=200)
    public java.lang.String getRebateauditoperator(){
        return this.rebateauditoperator;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  返点复核人
     */
    public void setRebateauditoperator(java.lang.String rebateauditoperator){
        this.rebateauditoperator = rebateauditoperator;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  返点复核状态:0未审核，1审核通过，2审核不通过
     */
    @Column(name ="REBATEAUDITSTATE",nullable=true,precision=10,scale=0)
    public java.lang.Integer getRebateauditstate(){
        return this.rebateauditstate;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  返点复核状态:0未审核，1审核通过，2审核不通过
     */
    public void setRebateauditstate(java.lang.Integer rebateauditstate){
        this.rebateauditstate = rebateauditstate;
    }
    /**
     *方法: 取得java.util.Date
     *@return: java.util.Date  返点复核时间
     */
    @Column(name ="REBATEREVIEWTIME",nullable=true)
    public java.util.Date getRebatereviewtime(){
        return this.rebatereviewtime;
    }

    /**
     *方法: 设置java.util.Date
     *@param: java.util.Date  返点复核时间
     */
    public void setRebatereviewtime(java.util.Date rebatereviewtime){
        this.rebatereviewtime = rebatereviewtime;
    }
    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  返点未通过原因
     */
    @Column(name ="REBATEREJECTREASON",nullable=true,length=200)
    public java.lang.String getRebaterejectreason(){
        return this.rebaterejectreason;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  返点未通过原因
     */
    public void setRebaterejectreason(java.lang.String rebaterejectreason){
        this.rebaterejectreason = rebaterejectreason;
    }
    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  退回复核人
     */
    @Column(name ="RETURNAUDITOPERATOR",nullable=true,length=200)
    public java.lang.String getReturnauditoperator(){
        return this.returnauditoperator;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  退回复核人
     */
    public void setReturnauditoperator(java.lang.String returnauditoperator){
        this.returnauditoperator = returnauditoperator;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  退回复核状态:0未审核，1审核通过，2审核不通过
     */
    @Column(name ="RETURNAUDITSTATE",nullable=true,precision=10,scale=0)
    public java.lang.Integer getReturnauditstate(){
        return this.returnauditstate;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  退回复核状态:0未审核，1审核通过，2审核不通过
     */
    public void setReturnauditstate(java.lang.Integer returnauditstate){
        this.returnauditstate = returnauditstate;
    }
    /**
     *方法: 取得java.util.Date
     *@return: java.util.Date  退回复核时间
     */
    @Column(name ="RETURNREVIEWTIME",nullable=true)
    public java.util.Date getReturnreviewtime(){
        return this.returnreviewtime;
    }

    /**
     *方法: 设置java.util.Date
     *@param: java.util.Date  退回复核时间
     */
    public void setReturnreviewtime(java.util.Date returnreviewtime){
        this.returnreviewtime = returnreviewtime;
    }

    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  退回未通过原因
     */
    @Column(name ="RETURNREJECTREASON",nullable=true,length=200)
    public java.lang.String getReturnrejectreason(){
        return this.returnrejectreason;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  退回未通过原因
     */
    public void setReturnrejectreason(java.lang.String returnrejectreason){
        this.returnrejectreason = returnrejectreason;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    @OneToOne
    @JoinColumn(name = "rebateauditoperator", insertable = false, updatable = false)
    public TSBaseUser getRebateAuditUser() {
        return rebateAuditUser;
    }

    public void setRebateAuditUser(TSBaseUser rebateAuditUser) {
        this.rebateAuditUser = rebateAuditUser;
    }

    @OneToOne
    @JoinColumn(name = "returnauditoperator", insertable = false, updatable = false)
    public TSBaseUser getReturnAuditUser() {
        return returnAuditUser;
    }

    public void setReturnAuditUser(TSBaseUser returnAuditUser) {
        this.returnAuditUser = returnAuditUser;
    }

    @Transient
    public String getRebateAuditUserName() {
        return  this.rebateAuditUser == null ? "" : this.rebateAuditUser.getUserName();
    }

    public void setRebateAuditUserName(String rebateAuditUserName) {
        this.rebateAuditUserName = rebateAuditUserName;
    }

    @Transient
    public String getReturnAuditUserName() {
        return this.returnAuditUser == null ? "" : this.returnAuditUser.getUserName();
    }

    public void setReturnAuditUserName(String returnAuditUserName) {
        this.returnAuditUserName = returnAuditUserName;
    }

    @Transient
    public String getRebateauditstateName() {
        if(null == this.rebateauditstate){
            return "";
        }
        switch (this.rebateauditstate){
            case 0:
                return "未复核";
            case 1:
                return "复核通过";
            case 2:
                return "复核不通过";
        }
        return rebateauditstateName;
    }

    public void setRebateauditstateName(String rebateauditstateName) {
        this.rebateauditstateName = rebateauditstateName;
    }

    @Transient
    public String getReturnauditstateName() {
        if(null == this.returnauditstate){
            return "";
        }
        switch (this.returnauditstate){
            case 0:
                return "未复核";
            case 1:
                return "复核通过";
            case 2:
                return "复核不通过";
        }
        return returnauditstateName;
    }

    public void setReturnauditstateName(String returnauditstateName) {
        this.returnauditstateName = returnauditstateName;
    }
}
